/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Damian
 */
@Embeddable
public class OfferCommentPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_OFFER_COMMENT")
    private int idOfferComment;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_OFFER")
    private int idOffer;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CLIENT")
    private int idClient;

    public OfferCommentPK() {
    }

    public OfferCommentPK(int idOfferComment, int idOffer, int idClient) {
        this.idOfferComment = idOfferComment;
        this.idOffer = idOffer;
        this.idClient = idClient;
    }

    public int getIdOfferComment() {
        return idOfferComment;
    }

    public void setIdOfferComment(int idOfferComment) {
        this.idOfferComment = idOfferComment;
    }

    public int getIdOffer() {
        return idOffer;
    }

    public void setIdOffer(int idOffer) {
        this.idOffer = idOffer;
    }

    public int getIdClient() {
        return idClient;
    }

    public void setIdClient(int idClient) {
        this.idClient = idClient;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idOfferComment;
        hash += (int) idOffer;
        hash += (int) idClient;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OfferCommentPK)) {
            return false;
        }
        OfferCommentPK other = (OfferCommentPK) object;
        if (this.idOfferComment != other.idOfferComment) {
            return false;
        }
        if (this.idOffer != other.idOffer) {
            return false;
        }
        if (this.idClient != other.idClient) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.OfferCommentPK[ idOfferComment=" + idOfferComment + ", idOffer=" + idOffer + ", idClient=" + idClient + " ]";
    }
    
}
